package cn.com.cetccst.appstore.database.dao;

import androidx.lifecycle.LiveData;
import androidx.room.Dao;
import androidx.room.Query;

import java.util.List;

import cn.com.cetccst.appstore.database.model.CategoryModel;

@Dao
public interface CategoryModelDao extends BaseDao<CategoryModel> {

    @Query("DELETE FROM " + CategoryModel.TABLE_NAME)
    void clearAll();

    @Query("SELECT * FROM " + CategoryModel.TABLE_NAME)
    LiveData<List<CategoryModel>> loadAllCategory();
}
